<template>
	<view class="container">
		<view class="empty-box" v-if="showNoData">
			<image class="empty-img" src="/static/icon_nodata_big.png"></image>
			<view>暂未绑定教练</view>
		</view>
		<view class="acticities-item" v-for="(item,itemIndex) in tabsLists" :key="itemIndex" @click="itemClick(item)">
			<view class="content_item">
				<image class="video-img" src="/static/logo.png"></image>
				<view class="content-right">
					<view class="item-title">
						<span>
							{{item.name}}
						</span>
						<!-- <span >
							{{item.phone?item.phone:"13316566645"}}
						</span> -->
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getmyinstructor
	} from '@/common/api/index.js'
	import {
		showTishi
	} from 'utils/index.js'
	export default {
		components: {},
		data() {
			return {
				// tabsLists: [{id:1,name:"谭工"},{id:1,name:"王工"}]
				tabsLists: []
			};
		},
		onPullDownRefresh() {

		},
		onLoad(options) {
			console.log(options, 'options');
			if (options != null && options != "") {
				uni.setStorageSync('orderQuery', JSON.stringify(options));
			} else {
				uni.setStorageSync('orderQuery', "");
			}
		},
		onShow() {
			this.getData()
		},
		methods: {
			// 请求接口获取数据
			getData() {
				getmyinstructor().then(res => {
					if (res.status == 0) {
						this.tabsLists = res.data
					} else {
						showTishi(res.msg)
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		overflow-y: hidden;
		// position: relative;
	}

	.top-box {
		position: fixed;
		width: 100%;
		z-index: 99;

		top: 0;
		border-bottom: 12rpx solid #f5f5f5;
	}


	.order-select {
		display: flex;
		height: 70rpx;
		font-size: 28rpx;
		background: #ffffff;
		font-weight: 400;
		line-height: 70rpx;
		color: #666666;

		.select-item {
			width: 50%;
			text-align: center;
			position: relative;
		}

		.arrow-down {
			margin-left: 20rpx;
		}
	}

	.acticities-item {
		margin-bottom: 20px;
		border: 1px solid #888;
		border-radius: 5px;
		padding: 5px;

		.content_item {
			display: flex;
			align-items: center;

		}

		.top_item {
			font-size: 12px;
			color: #888;
		}

		.video-img {
			width: 60px;
			height: 60px;
			margin-right: 10px;
		}

		.content-right {
			flex: 1;
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			line-height: 60px;

			.item-title {
				font-size: 16px;
				font-weight: bold;
				display: flex;
				justify-content: inherit;
			}

			.item-uptatetime {
				font-size: 12px;
				color: #888;
				margin-top: 15rpx;
			}

			.item-price {
				font-size: 20px;
				color: #ff0000;
				margin-top: 20rpx;
			}

			.item-payunm {
				font-size: 14px;
				color: #888;
				margin-top: 10rpx;
			}

			.item_bottom {
				display: flex;
				justify-content: flex-end;

				view {
					margin-top: -20px;
					font-size: 12px;
					color: white;
					border-radius: 10px;
					padding: 10px 15px;
					margin-left: 10px;
					background-color: #409EFF;
				}
			}
		}
	}
</style>